<?php

use think\migration\Migrator;
use think\migration\db\Column;

class CreateUserProtocol extends Migrator
{
    public function up()
    {
        $table = $this->table('user_protocol',['comment'=>'用户协议']);
        $table->addColumn('type','integer',['limit'=>1,'comment'=>'1用户端 2跑男端'])
            ->addColumn('content','text',['comment'=>'协议内容'])
            ->addColumn('create_time','integer',['limit'=>10,'signed'=>false,'comment'=>'创建时间'])
            ->addColumn('update_time','integer',['limit'=>10,'signed'=>false,'comment'=>'修改时间'])
            ->create();
    }
    public function down(){
        $this->dropTable('user_protocol');
    }
}
